/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2012
 */

package com.tech15.task.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.tech15.task.model.*;
import com.tech15.task.dao.*;
import com.tech15.task.service.*;
import com.tech15.task.vo.query.*;

/**
 * @author 胡作正 email:zuozhenghu@sina.com
 * @version 1.0
 * @since 1.0
 */


@Entity
@Table(name = "ZDXZDC_CLJL")
public class ZdxzdcCljl extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "重大行政督办事项";
	public static final String ALIAS_ID = "序号";
	public static final String ALIAS_DCID = "督查id";
	public static final String ALIAS_ISYWC = "是否完成";
	public static final String ALIAS_XYGZJH = "下一步工作计划";
	public static final String ALIAS_WCQK = "完成情况";
	public static final String ALIAS_ZT = "执行状态（0未处理 1完成 2退回 3待审核）";
	public static final String ALIAS_ZXR = "执行人";
	public static final String ALIAS_ZXRXM = "执行人姓名";
	public static final String ALIAS_RWSJ = "任务时间";
	public static final String ALIAS_WCSJ = "完成时间";
	
	//date formats
	public static final String FORMAT_RWSJ = DATE_FORMAT;
	public static final String FORMAT_WCSJ = DATE_FORMAT;
	

	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * 序号       db_column: ID 
     */ 	
	@Length(max=32)
	private java.lang.String id;
    /**
     * 督查id       db_column: DCID 
     */ 	
	@Length(max=32)
	private java.lang.String dcid;
    /**
     * 是否完成       db_column: ISYWC 
     */ 	
	@Max(127)
	private Integer isywc;
    /**
     * 下一步工作计划       db_column: XYGZJH 
     */ 	
	@Length(max=600)
	private java.lang.String xygzjh;
    /**
     * 完成情况       db_column: WCQK 
     */ 	
	@Length(max=600)
	private java.lang.String wcqk;
    /**
     * 执行状态（0未处理 1完成 2退回 3待审核）       db_column: ZT 
     */ 	
	@Max(127)
	private Integer zt;
    /**
     * 执行人       db_column: ZXR 
     */ 	
	
	private Long zxr;
    /**
     * 执行人姓名       db_column: ZXRXM 
     */ 	
	@Length(max=30)
	private java.lang.String zxrxm;
    /**
     * 任务时间       db_column: RWSJ 
     */ 	
	
	private java.util.Date rwsj;
    /**
     * 完成时间       db_column: WCSJ 
     */ 	
	
	private java.util.Date wcsj;
	
	private Integer optact;
	//columns END


	public ZdxzdcCljl(){
	}

	public ZdxzdcCljl(
		java.lang.String id
	){
		this.id = id;
	}

	

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	@Id @GeneratedValue(generator="custom-id")
	@GenericGenerator(name="custom-id", strategy = "uuid.hex")
	@Column(name = "ID", unique = true, nullable = false, insertable = true, updatable = true, length = 32)
	public java.lang.String getId() {
		return this.id;
	}
	
	@Column(name = "DCID", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getDcid() {
		return this.dcid;
	}
	
	public void setDcid(java.lang.String value) {
		this.dcid = value;
	}
	
	@Column(name = "ISYWC", unique = false, nullable = true, insertable = true, updatable = true, length = 2)
	public Integer getIsywc() {
		return this.isywc;
	}
	
	public void setIsywc(Integer value) {
		this.isywc = value;
	}
	
	@Column(name = "XYGZJH", unique = false, nullable = true, insertable = true, updatable = true, length = 600)
	public java.lang.String getXygzjh() {
		return this.xygzjh;
	}
	
	public void setXygzjh(java.lang.String value) {
		this.xygzjh = value;
	}
	
	@Column(name = "WCQK", unique = false, nullable = true, insertable = true, updatable = true, length = 600)
	public java.lang.String getWcqk() {
		return this.wcqk;
	}
	
	public void setWcqk(java.lang.String value) {
		this.wcqk = value;
	}
	
	@Column(name = "ZT", unique = false, nullable = true, insertable = true, updatable = true, length = 2)
	public Integer getZt() {
		return this.zt;
	}
	
	public void setZt(Integer value) {
		this.zt = value;
	}
	
	@Column(name = "ZXR", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getZxr() {
		return this.zxr;
	}
	
	public void setZxr(Long value) {
		this.zxr = value;
	}
	
	@Column(name = "ZXRXM", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public java.lang.String getZxrxm() {
		return this.zxrxm;
	}
	
	public void setZxrxm(java.lang.String value) {
		this.zxrxm = value;
	}
	
	@Transient
	public String getRwsjString() {
		return DateConvertUtils.format(getRwsj(), FORMAT_RWSJ);
	}
	public void setRwsjString(String value) {
		setRwsj(DateConvertUtils.parse(value, FORMAT_RWSJ,java.util.Date.class));
	}
	
	@Column(name = "RWSJ", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getRwsj() {
		return this.rwsj;
	}
	
	public void setRwsj(java.util.Date value) {
		this.rwsj = value;
	}
	
	@Transient
	public String getWcsjString() {
		return DateConvertUtils.format(getWcsj(), FORMAT_WCSJ);
	}
	public void setWcsjString(String value) {
		setWcsj(DateConvertUtils.parse(value, FORMAT_WCSJ,java.util.Date.class));
	}
	
	@Column(name = "WCSJ", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getWcsj() {
		return this.wcsj;
	}
	
	public void setWcsj(java.util.Date value) {
		this.wcsj = value;
	}
	
	@Column(name = "OPTACT", unique = false, nullable = true, insertable = true, updatable = true, length = 2)
	public Integer getOptact() {
		return optact;
	}

	public void setOptact(Integer optact) {
		this.optact = optact;
	}
	
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Dcid",getDcid())
			.append("Isywc",getIsywc())
			.append("Xygzjh",getXygzjh())
			.append("Wcqk",getWcqk())
			.append("Zt",getZt())
			.append("Zxr",getZxr())
			.append("Zxrxm",getZxrxm())
			.append("Rwsj",getRwsj())
			.append("Wcsj",getWcsj())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof ZdxzdcCljl == false) return false;
		if(this == obj) return true;
		ZdxzdcCljl other = (ZdxzdcCljl)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
	
	
}

